"""
@Project ：BiShe
@File    ：weather.py
@IDE     ：PyCharm
@Author  ：zhupp
@Date    ：2024/10/27 14:07
"""
import requests
import json

def get_weather_info(city_code):
    base_url = 'https://restapi.amap.com/v3/weather/weatherInfo'
    rsp = requests.get(base_url, params={
        'key': '8aec8c15e402cf89d93e5f3c22a74104',
        'city': city_code,
        'extensions': 'base',
    })
    return rsp.json()


if __name__ == '__main__':
    print(get_weather_info("420700"))


